import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useStudentStroes = defineStore('data', () => {
  const studentList = ref([])
  const setStudentList = (val) => {
    studentList.value = val
  }

  const tagList = ref([])
  const setTagList = val => {
    tagList.value = val
  }

  return {
    studentList,
    setStudentList,
    tagList,
    setTagList
  }
}, {
  persist: {
    storage: {
      getItem(key) {
        return uni.getStorageSync(key)
      },
      setItem(key, value) {
        uni.setStorageSync(key, value)
      }
    }
  }
})
